package com.da.javatest.leetCode;

/**
 * @author chenlida
 * @date 2019/1/21 16:26
 * @description
 */
public class Code231 {
    public static void main(String[] args) {
        System.out.println(2 >> 1);
    }

    public boolean isPowerOfTwo(int n) {
        if (n <= 0) {
            return false;
        }
        while (n % 2 == 0) {
            n >>= 1;
        }
        return n == 1;
    }
}
